package com.ruoyi.project.device.devrecord.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.device.devrecord.mapper.BasDeviceRecordMapper;
import com.ruoyi.project.device.devrecord.domain.BasDeviceRecord;
import com.ruoyi.project.device.devrecord.service.IBasDeviceRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 设备运行记录Service业务层处理
 * 
 * @author wld
 * @date 2023-04-04
 */
@Service
public class BasDeviceRecordServiceImpl implements IBasDeviceRecordService 
{
    @Autowired
    private BasDeviceRecordMapper basDeviceRecordMapper;

    /**
     * 查询设备运行记录
     * 
     * @param id 设备运行记录主键
     * @return 设备运行记录
     */
    @Override
    public BasDeviceRecord selectBasDeviceRecordById(String id)
    {
        return basDeviceRecordMapper.selectBasDeviceRecordById(id);
    }

    /**
     * 查询设备运行记录列表
     * 
     * @param basDeviceRecord 设备运行记录
     * @return 设备运行记录
     */
    @Override
    public List<BasDeviceRecord> selectBasDeviceRecordList(BasDeviceRecord basDeviceRecord)
    {
        return basDeviceRecordMapper.selectBasDeviceRecordList(basDeviceRecord);
    }

    /**
     * 新增设备运行记录
     * 
     * @param basDeviceRecord 设备运行记录
     * @return 结果
     */
    @Override
    public int insertBasDeviceRecord(BasDeviceRecord basDeviceRecord)
    {
        return basDeviceRecordMapper.insertBasDeviceRecord(basDeviceRecord);
    }

    /**
     * 修改设备运行记录
     * 
     * @param basDeviceRecord 设备运行记录
     * @return 结果
     */
    @Override
    public int updateBasDeviceRecord(BasDeviceRecord basDeviceRecord)
    {
        return basDeviceRecordMapper.updateBasDeviceRecord(basDeviceRecord);
    }

    /**
     * 批量删除设备运行记录
     * 
     * @param ids 需要删除的设备运行记录主键
     * @return 结果
     */
    @Override
    public int deleteBasDeviceRecordByIds(String ids)
    {
        return basDeviceRecordMapper.deleteBasDeviceRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除设备运行记录信息
     * 
     * @param id 设备运行记录主键
     * @return 结果
     */
    @Override
    public int deleteBasDeviceRecordById(String id)
    {
        return basDeviceRecordMapper.deleteBasDeviceRecordById(id);
    }
}
